package cn.edu.tjufe.llp.tin.repository.sys;

import java.util.List;
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import cn.edu.tjufe.llp.tin.model.sys.SysUser;
import cn.edu.tjufe.llp.tin.repository.SoftDeletesRepository;

@Repository
public interface SysUserRepository extends SoftDeletesRepository<SysUser, Long>, JpaSpecificationExecutor<SysUser>{
	Optional<SysUser> findById(long id);
	Optional<SysUser> findByUsername(String username);
	boolean existsByUsername(String username);
	
	List<SysUser> findByUsernameContains(String username);

}
